-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement built-in await syntax #60586
Conversation
Some changes occurred in diagnostic error codes @highfive: run-doc-ui d5072b54ac4342f97688391fede9e2caff6b133a |
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo everyone else's comments.
@bors p=50 This is a priority for the project and we want to facilitate writing of tests. |
r=me with @Centril happy. The rusfixable suggestion part should happen fast or not at all, since there's no point in creating it for just a week or two.On 7 May 2019 21:38, Taylor Cramer <notifications@github.com> wrote:@cramertj commented on this pull request.
In src/libsyntax/ast.rs:
@@ -1186,6 +1187,9 @@ pub enum ExprKind {
/// created during lowering cannot be made the parent of any other
/// preexisting defs.
Async(CaptureBy, NodeId, P<Block>),
+ /// An await expression (`my_future.await`)
Done.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
|
@oli-obk Okay, in that case I'd like to go ahead and land this without in order to land this soon and unblock testing. |
Oh definitely. That's what I meant. Do it in a followup PR soon (or not), but land this PR with the `desugar` -> `lower` changeOn 7 May 2019 22:06, Taylor Cramer <notifications@github.com> wrote:@oli-obk Okay, in that case I'd like to go ahead and land this without in order to land this soon and unblock testing.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
|
| ^^^^^^^^^^^^^^ | ||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) | ||
LL | bar().await; | ||
| ^^^^^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #60615
Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature.
@bors r=oli-obk |
📌 Commit fe8760c has been approved by |
Implement built-in await syntax Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature. This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/ Fix #51719 Fix #51751 Fix #60016
🎉 This is so exciting! 🎈 |
☀️ Test successful - checks-travis, status-appveyor |
📣 Toolstate changed by #60586! Tested on commit 33cde4a. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra). |
Tested on commit rust-lang/rust@33cde4a. Direct link to PR: <rust-lang/rust#60586> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @Xanewok, @rust-lang/infra).
rustup rust-lang/rust#60586 cc rust-lang/rust#60623 changelog: none
Changes: ```` rustup rust-lang#60586 Add test for rust-lang#771. Clean up while_loop tests ````
I just came from a Reddit post and I don't like postfix syntax at all. And it seems that the majority of Reddit don't like it either. I already commented on #50547 (comment) but I also write this comment to make my argument more visible. I hope this syntax isn't final (i.e. You guys are willing to break postfix syntax for every nightly user in favor of a sane preference) |
This is not the place to express disagreement with the language design choices made. Nor is the tracking issue: the language design team has made an explicit post on Discourse soliciting input. If you plan to comment there, please bear in mind that the discussion has already played out quite a bit: make sure you have something substantial to say, and make sure it's not been said before in the thread. |
Changes: ```` rustup rust-lang/rust#60586 Add test for rust-lang#771. Clean up while_loop tests ````
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for
await
as a non-keyword under theasync_await
feature.
This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/
Fix #51719
Fix #51751
Fix #60016